package a.f.n;

import a.c.bb;
import a.c.e;
import a.c.j;
import a.c.x;
import a.d.t;
import a.f.o;
import a.f.zc;

class u
  implements gb
{
  private gb h;
  private a.d.u i;
  private e j;
  private bb k;
  private x l;
  private x m;
  private gb n;
  
  public u(gb paramgb, e parame, bb parambb, x paramx1, x paramx2, a.d.u paramu)
  {
    this.h = paramgb;
    this.j = parame;
    this.l = paramx1;
    this.k = parambb;
    if (!bool2)
    {
      this.m = paramx2;
      if ((paramgb instanceof u))
      {
        if (bool2) {
          break label76;
        }
        this.n = ((u)paramgb).a();
        if (!bool1) {
          break label79;
        }
      }
    }
    label76:
    this.n = paramgb;
    label79:
    if (paramu == null)
    {
      if (bool2) {
        break label112;
      }
      this.i = new a.d.u(0.0D, 0.0D, 0.0D, 0.0D);
      if (!bool1) {
        return;
      }
    }
    label112:
    this.i = paramu;
  }
  
  public gb a()
  {
    return this.n;
  }
  
  public void a(e parame, j paramj)
  {
    this.h.a(parame, paramj);
  }
  
  public d.a_ a(a.c.k paramk1, a.c.k paramk2, o paramo, e parame, byte paramByte)
  {
    d.a_ locala_ = this.h.a(paramk1, paramk2, paramo, parame, paramByte);
    t localt = a(paramo, parame, locala_);
    locala_.b(localt.d(), localt.e(), localt.b(), localt.c());
    this.m.a(this.j, parame);
    paramo.b(this.j, localt.a, localt.b);
    paramo.c(this.j, localt.d - locala_.k(), localt.e - locala_.l());
    return locala_;
  }
  
  private t a(o paramo, e parame, d.a_ parama_)
  {
    boolean bool2 = k.n;
    boolean bool1 = k.m;
    t localt = null;
    a.c.w localw = this.k.l();
    label143:
    label145:
    do
    {
      if (!localw.e()) {
        break;
      }
      e locale1 = localw.d();
      if (bool1) {
        break label262;
      }
      if ((bool2) || (locale1 != this.j))
      {
        int i1 = locale1.g() == null ? 1 : 0;
        if (i1 != 0)
        {
          e locale2 = (e)this.m.get(locale1);
          a.d.w localw2 = a(locale2, parame, paramo, parama_);
          a.d.w localw3 = paramo.r(locale1);
          if (bool2) {
            break label143;
          }
          localw1 = a.d.w.b(localw2, localw3);
          if (!bool1) {
            break label145;
          }
        }
        a.d.w localw1 = a(locale1, parame, paramo, parama_);
        localt = a(localt, new t(localw1, paramo.u(locale1)));
      }
      localw.f();
    } while (!bool1);
    if (!bool2) {
      localt = new t(localt.d() - this.i.c, localt.e() - this.i.b, localt.b() + this.i.c + this.i.e, localt.c() + this.i.b + this.i.d);
    }
    label262:
    return localt;
  }
  
  private a.d.w a(e parame1, e parame2, o paramo, d.a_ parama_)
  {
    boolean bool2 = k.n;
    boolean bool1 = k.m;
    a.d.w localw;
    if (parame1 == parame2)
    {
      localw = new a.d.w(parama_.k(), parama_.l());
      if (!bool1) {}
    }
    else
    {
      double d1 = 0.0D;
      double d2 = 0.0D;
      Object localObject1 = parame1.i().e();
      do
      {
        if (localObject1 == parame2) {
          break;
        }
        localObject2 = ((e)localObject1).i().e();
        d.a_ locala_ = a((e)localObject1);
        if (!bool2)
        {
          if (localObject2 == parame2)
          {
            d1 += locala_.k() - locala_.l;
            d2 += locala_.l() - locala_.m;
            if (bool2) {
              continue;
            }
            if (!bool1) {}
          }
          else
          {
            d1 += locala_.l;
          }
        }
        else {
          d2 += locala_.m;
        }
        localObject1 = localObject2;
      } while (!bool1);
      Object localObject2 = paramo.d(parame1);
      localw = new a.d.w(((zc)localObject2).a() + d1, ((zc)localObject2).b() + d2);
    }
    return localw;
  }
  
  private d.a_ a(e parame)
  {
    return (d.a_)this.l.get(parame);
  }
  
  private t a(t paramt1, t paramt2)
  {
    boolean bool = k.n;
    if (!bool) {
      if (paramt1 == null) {
        return paramt2;
      }
    }
    if (!bool) {
      if (paramt2 == null) {
        return paramt1;
      }
    }
    double d1 = Math.min(paramt1.d(), paramt2.d());
    double d2 = Math.max(paramt1.d() + paramt1.b(), paramt2.d() + paramt2.b());
    double d3 = Math.min(paramt1.e(), paramt2.e());
    double d4 = Math.max(paramt1.e() + paramt1.c(), paramt2.e() + paramt2.c());
    return new t(d1, d3, d2 - d1, d4 - d3);
  }
  
  public ib a(d paramd, o paramo, e parame)
  {
    return this.h.a(paramd, paramo, parame);
  }
}


/* Location:           E:\idea\
 * Qualified Name:     a.f.n.u
 * JD-Core Version:    0.7.0.1
 */